<template>
  <div>
    <el-card>
      <div class="btn">
        <el-button type="primary">主要按钮</el-button>
        <el-button type="primary" @click="submitForm">上传信息</el-button>
      </div>
      <el-form :model="form" ref="form" label-position="top">
        <el-form-item label="新建文章">
          <quill-editor v-model="form.content" class="editor" :content="form.content" />
        </el-form-item>
      </el-form>
    </el-card>
  </div>
</template>

<script>
import 'quill/dist/quill.snow.css'
import { quillEditor } from 'vue-quill-editor'

export default {
  components: {
    quillEditor,
  },
  data() {
    return {
      form: {
        content: '', // 富文本编辑器内容
      },
    };
  },
  methods: {
    submitForm() {
      // 在这里可以处理发布按钮的逻辑，将富文本内容和上传的图片数据提交到服务器
      console.log('发布内容:', this.form.content);
    },
  },
  
};
</script>

<style>
.editor {
  height: 350px;
  margin-bottom: 50px;
  background-color: #f5f5f5;
}
.btn {
  float: right;
}
</style>
